home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / jump_gam.swf / scripts / DefineSprite_914 / frame_1 / DoAction.as
Encoding:
Text File  |  2010-04-12  |  1.2 KB  |  61 lines

  1. function music(value)
  2. {
  3.    if(value == 1)
  4.    {
  5.       loopSound2.start(0,3);
  6.       loopSound2.onSoundComplete = function()
  7.       {
  8.          loopSound2_2.start(0,0);
  9.       };
  10.       loopSound2_2.onSoundComplete = function()
  11.       {
  12.          loopSound3.start(0,999);
  13.       };
  14.       endSound1 = function()
  15.       {
  16.          stopAllSounds();
  17.          loopSound2.start();
  18.       };
  19.       endSound3 = function()
  20.       {
  21.          stopAllSounds();
  22.          loopSound2_2.start(0,1);
  23.       };
  24.    }
  25.    else
  26.    {
  27.       loopSound2.stop();
  28.       loopSound2_2.stop();
  29.       loopSound3.stop();
  30.    }
  31. }
  32. stopAllSounds();
  33. loopSound1 = new Sound();
  34. loopSound1.attachSound("loop1");
  35. loopSound2 = new Sound();
  36. loopSound2.attachSound("loop2");
  37. loopSound2_2 = new Sound();
  38. loopSound2_2.attachSound("loop2_2");
  39. loopSound3 = new Sound();
  40. loopSound3.attachSound("loop3");
  41. loopSound2.start(0,3);
  42. loopSound2.onSoundComplete = function()
  43. {
  44.    loopSound2_2.start(0,0);
  45. };
  46. loopSound2_2.onSoundComplete = function()
  47. {
  48.    loopSound3.start(0,999);
  49. };
  50. endSound1 = function()
  51. {
  52.    stopAllSounds();
  53.    loopSound2.start();
  54. };
  55. endSound3 = function()
  56. {
  57.    stopAllSounds();
  58.    loopSound2_2.start(0,1);
  59. };
  60. stop();
  61.